#ifndef MEMBER_H
#define MEMBER_H
#include<iostream>
#include<common.h>
#include<vector>

struct Member{
    std::string id;
    std::string name;
    bool enable;
};


class MemberManage{
private:
    std::vector<Member> members;
    std::string getNewId();

    //TODO delete ,implement it later
    bool deleteMember();
public:
    MemberManage();
    ~MemberManage();
    std::string toJson();
    Member getMember(const int & i);
    int count();
    bool addMember(const std::string & name);
    bool editMember(const int & index,const std::string & id ,const std::string & name);

    bool initFromJsonString(const std::string & json);

};

#endif // MEMBER_H
